/*
    mathtools, a calculator-complimentary application for math studies
    Copyright (C) 2009 Irving Axel Jounior Rivas Zarete

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

    If you need to contact me, please do so: axel (period) rivas (inside) gmail (dot) com
*/
#include <stdio.h>
#include "mathui.c"

int main(int argc, char* argv[]){	int i = 0;	int n = 1;
	char opcion;	printf("mathtools Version Esqueleto+++\n");
	printf("mathtools Copyright (C) 2009 Irving A. J. Rivas Zarete\n");
	printf("This program comes with ABSOLUTELY NO WARRANTY;\nThis is free software, and you are welcome to redistribute it\nunder certain conditions; read the file named COPYING for details.\n");
	//this fork is used to state that arguments are useless in this program.	if (argc > 1){		printf("En estos momentos el programa no acepta argumentos. Intenta ejecutarlo por si solo.\n");		printf("Los argumentos introducidos fueron:\n");
		//loop to print every argument		for(i = 1;i < argc;i ++){			printf("%s\n",argv[i]);		}		printf("y no ayudan en nada! :-(\n");	}	printf("Hasta ahora estan implementadas dos funciones: determinar si un numero es primo ");
	printf("y la determinacion de los factores primos de un numero.\n");
	//calling the menu printing and assigning the option chosen to opcion
	opcion = menu();
	//Forking, depending on the chosen option, takes a path
	if( (opcion == 'a') || (opcion=='A') ){
		uifprimos();
	}
	//Still forking~ this is NOT elegant, needs to be rewritten.
	if( (opcion == 'b') || (opcion == 'B') ){
		uiesprimo();	}
	return 0;}
